/**
 * Created by CK on 2017/3/1.
 */
  var list;
$(document).ready(function () {
    list = $('#List');
    var type = xhTool.getQuery('type');
	$('.xh-datagrid-toolbar').parseToolbar(afterParseToolbar);
    $('.xh-form').parseForm($('#bt_form_add, #bt_form_edit'));
	setTimeout(function () {
        $('.panel-title').text(decodeURI(xhTool.getQuery('sTitle',true))+'-'+$('.panel-title').text());
    }, 2000);
    var iSysTrId = xhTool.getQuery('iSysTrId');
	var iCreateUserId = xhTool.getQuery('iCreateUserId');
    var queryParams = {
    };
    list.initDataGrid(baseUrl + 'Statsexplain/getTeacherTopicView?iSysTrId='+iSysTrId+'&iCreateUserId='+iCreateUserId, {queryParams: queryParams}).setSelectThenEnable(['bt_list_del', 'bt_list_Publish']);
	DataGrid.onDblClickRow = function(rowIndex, rowData){
        window.top.xhTop.showModal({
            title: '老师录制课件播放',
            content: "<iframe frameborder='0' style='width: 570px;height: 400px;' src='" + rowData.coursewarePlayUrl + "'></iframe>",
            size: 'md'
        });
    };
});

function afterParseToolbar()
{
    $.overtFun.vagueSearch(list);
}
